package com.lanchetech.dao;

import com.lanchetech.bean.request.MeetingUserPageReq;
import com.lanchetech.bean.vo.MeetingUserVO;
import com.lanchetech.entity.MeetingUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface MeetingUserMapper {
    int deleteByPrimaryKey(Long id);

    int insert(MeetingUser record);

    int insertSelective(MeetingUser record);

    MeetingUser selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(MeetingUser record);

    int updateByPrimaryKey(MeetingUser record);

    List<MeetingUserVO> findAllPage(MeetingUserPageReq req);

    Long countByUserIdAndVerifyStatus(@Param("userId") Long userId, @Param("verifyStatus") Byte verifyStatus);

    MeetingUser findOneByUserIdAndStatusAndMeetingId(@Param("userId") Long userId, @Param("status") Byte status, @Param("meetingId") Long meetingId);

    List<MeetingUser> findAllByUserIdAndStatus(@Param("userId") Long userId, @Param("status") Byte status);

    MeetingUser findOneByUserIdAndMeetingId(@Param("userId") Long userId, @Param("meetingId") Long meetingId);

    int updateStatusById(@Param("updatedStatus") Byte updatedStatus, @Param("id") Long id);
}